/**
 * 
 */
package com.fox.webapp.persistent;

import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.fox.webapp.domain.SiteMessage;

/**
 * @author yockii
 *
 */
public interface SiteMessageRepository extends
		PagingAndSortingRepository<SiteMessage, ObjectId> {

	Page<SiteMessage> findByFromUsername(String fromUsername, Pageable pageRequest);
	
	Page<SiteMessage> findByToUsername(String toUsername, Pageable pageRequest);
	
}
